//
//  UIView+Frame.m
//  Weibo
//
//  Created by Justsoso on 16/4/25.
//  Copyright © 2016年 Justsoso. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)setX_:(CGFloat)x_
{
    CGRect frame = self.frame;
    frame.origin.x = x_;
    self.frame = frame;
}

- (void)setY_:(CGFloat)y_
{
    CGRect frame = self.frame;
    frame.origin.x = y_;
    self.frame = frame;
}

- (void)setWidth_:(CGFloat)width_
{
    CGRect frame = self.frame;
    frame.origin.x = width_;
    self.frame = frame;
}

- (void)setHeight_:(CGFloat)height_
{
    CGRect frame = self.frame;
    frame.origin.x = height_;
    self.frame = frame;
}

- (CGFloat)x_
{
    return self.frame.origin.x;
}

- (CGFloat)y_
{
    return self.frame.origin.y;
}

- (CGFloat)width_
{
    return self.frame.size.width;
}

- (CGFloat)height_
{
    return self.frame.size.height;
}
@end
